<?php
echo $this->Html->charset();
        
?>
<html>
    <head>
        <title>
            <?php
                echo $title_for_layout; /* Tiêu d? c?a trang web */   
            ?>
        </title>
        <?php echo $html->css("style.css");
              echo $html->css("../js/jquery-ui/css/redmond/jquery-ui-1.8.13.custom.css");
              echo $html->css("../js/jscalendar/calendar-blue.css");
              
              echo $javascript->link("jquery-1.5.2.min.js");
              echo $javascript->link("jquery-ui/js/jquery-ui-1.8.13.custom.min.js");
              echo $javascript->link("jscalendar/calendar.js");
			  echo $javascript->link("menu.js");
              echo $javascript->link("jscalendar/lang/calendar-vi.js");
              echo $javascript->link("jscalendar/calendar-setup.js");
        ?>
   </head>
    <body>
        <div id="container">
        <div id="header">
        	<span id="sp1">TRANG QUẢN TRỊ</span>
            <span id="sp2"><i>Chào mừng</i> <b><font color="#FFF">
                </font></b><i>đã đăng nhập</i>
                [<img src="/onlinemarket/img/system/bt_logout.png" style="margin-left: 5px; vertical-align: middle;"/> 
                <a style="text-decoration: underline; color: white;" href="/onlinemarket/logon/logout">Thoát</a>&nbsp;]
            </span>
        </div>
            <div id="menu">
    	<ul>
            <li id="menu1">
                <a href="/onlinemarket/customers">
                    <img src="/onlinemarket/img/home.png" border="0" style="margin:5px; float:left;" /> Trang chủ
                </a>
            </li>
            <li id="menu2"><a href="/onlinemarket/products">Sản phẩm</a>
            	<ul>
                    <li><a href="/onlinemarket/products">Sản phẩm</a></li>
                    <li><a href="/onlinemarket/product_groups">Nhóm sản phẩm</a></li>
                    <li><a href="#">Chi tiết</a></li>
                    <li><a href="/onlinemarket/providers">Nhà sản xuất</a></li>
                    <li><a href="#">Nhận xét</a></li>
                    <li><a href="/onlinemarket/offsales">Khuyến mãi</a></li>
               </ul>
               
            </li>
            <li id="menu3"><a href="/onlinemarket/shops">Cửa hàng</a>
            	<ul>
                    <li><a href="/onlinemarket/shops">Danh mục</a></li>
                    <li><a href="/onlinemarket/shoptypes">Gói dịch vụ</a></li>
                    <li><a href="/onlinemarket/shopfunctions">Bảng chức năng</a></li>
               </ul>
            </li>
            <li id="menu4"><a href="#">Bán hàng</a>
            	<ul>
                    <li><a href="#">Đặt hàng</a></li>
                    <li><a href="/onlinemarket/customers">Khách hàng</a></li>
                    <li ><a href="#">Nhóm khách hàng</a></li>
                    <li ><a href="/onlinemarket/orders">Hóa đơn</a></li>
                    <li ><a href="#">Chi tiết hóa đơn</a></li>
                    <li ><a href="/onlinemarket/paymethods">Phương thức thanh toán</a></li>
               </ul>
            </li>
            <li id="menu5"><a href="#">Hệ thống</a>
           	    <ul>
                     <li><a href="#">Cài đặt</a></li>
                    <li><a href="#">Ngôn ngữ </a></li>
                    <li ><a href="#">Tiền tệ</a></li>
                    <li><a href="#">Thành viên</a></li>
                    <li><a href="#">Nhật ký</a></li>
                    <li><a href="#">Sao lưu/Phục hồi</a></li>
               </ul>
            </li>
            <li id="menu6"><a href="#">Báo cáo</a>
            	<ul>
                    <li><a href="#">Bán hàng</a></li>
                    <li><a href="#">Cửa hàng</a></li>
                    <li ><a href="#">Khách hàng</a></li>
                    <li><a href="#">Sản phẩm HOT</a></li>
                    <li><a href="#">Sản phẩm mua nhiều</a></li>
               </ul>
            </li>
            <li id="menu7"><a href="/onlinemarket/feedbacks">Phản hồi</a></li>
            <li id="menu8"><a href="/onlinemarket/admins">Tài khoản</a></li>
       </ul>
       <input type="hidden" id="topmenuid" value=""/>
    </div><!--end div#header-->

        <div id="content">
            <?php echo $content_for_layout;?>
            <?php 
               //  echo $this->element('default'.DS.'header.ctp');
            ?>
        </div>
        </div>
    </body>
    <script type="text/javascript">
        $(document).ready(function(){
            onloadmenu();
    		$("#menu li").hover(function(){
    			$(this).find('ul').css({visibility:"visible",display:"none"}).show(400);
    			
    		},function(){
    			$(this).find('ul').css({visibility:"hidden"});
    		});
        });
        function onloadmenu() {
            if (window.location.toString().toLowerCase().indexOf('/onlinemarket/customers'.toLowerCase()) > 0) {
                $("#topmenuid").val('menu4');
            }
            if (window.location.toString().toLowerCase().indexOf('/onlinemarket/products'.toLowerCase()) > 0) {
                $("#topmenuid").val('menu2');
            }
            if (window.location.toString().toLowerCase().indexOf('/onlinemarket/product_groups'.toLowerCase()) > 0) {
                $("#topmenuid").val('menu2');
            }
            if (window.location.toString().toLowerCase().indexOf('/onlinemarket/providers'.toLowerCase()) > 0) {
                $("#topmenuid").val('menu2');
            }
            if (window.location.toString().toLowerCase().indexOf('/onlinemarket/offsales'.toLowerCase()) > 0) {
                $("#topmenuid").val('menu2');
            }
            if (window.location.toString().toLowerCase().indexOf('/onlinemarket/admins'.toLowerCase()) > 0) {
                $("#topmenuid").val('menu8');
            }
            if (window.location.toString().toLowerCase().indexOf('/onlinemarket/feedbacks'.toLowerCase()) > 0) {
                $("#topmenuid").val('menu7');
            }
            var topmenu = $("#topmenuid").val();
            $("#" + topmenu).addClass("current");
        }
        $("input:submit, input:button").button();
        $("input:submit, input:button").css("height", "25px");
        $("input:submit, input:button").css("padding-top", "0.3em");
    </script>
</html>